package com.woniuxy.controller;

import com.woniuxy.entity.ClassRoom;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author 佘赛飞
 * @create 2021 -11 -18 10:35 PM
 */
@Controller
@RequestMapping("/manyToOne")
public class manyToOneController {
    @RequestMapping("/manyToOneController")
    public ModelAndView manyToOneController(ClassRoom classRoom) {

        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("classRoom", "传入的多对多的参数：" + classRoom);
        modelAndView.setViewName("/manyToManyview");
        return modelAndView;
    }
}
